# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=farstream
pkgver=0.2.9
pkgrel=0
pkgdesc="Libraries for videoconferencing"
url="https://www.freedesktop.org/wiki/Software/Farstream"
arch="all"
license="LGPL-2.0-or-later AND GPL-2.0-or-later"
depends_dev="libnice-dev gst-plugins-base-dev"
makedepends="$depends_dev automake autoconf gobject-introspection-dev gstreamer-dev"
subpackages="$pkgname-dev $pkgname-doc"
source="https://freedesktop.org/software/farstream/releases/farstream/farstream-$pkgver.tar.gz
	fix-gst-glib-gen_mak.patch
	"

prepare() {
	default_prepare
	autoreconf -fi
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--disable-static
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

py() {
	pkgdesc="Python binding for farstream"
	mkdir -p "$subpkgdir"/usr/lib/
	mv "$pkgdir"/usr/lib/python* "$subpkgdir"/usr/lib/
}

sha512sums="8840725d2f1de59bebc8c49cf68a6712822a4e7b6ba9078713f80e3c35a39135565a1a885edab43a562f895e11b8f5d8d666d57d9b3814dabb661f46498515bd  farstream-0.2.9.tar.gz
36ba076bbb33394d00571d2fd49ea11a0360d8db54d3009262a1c4a8372910bfb086baf1bf436640528f8a700b0f266d1b8134feda6aec4035474fd12211d384  fix-gst-glib-gen_mak.patch"
